
def p(n,s):   
  print('\n'.join([f"{' '*(s-x)}{'*'*(2*x-1)}" for x in range(1,n+1)]))  

def printTree(*args):
  mid = max(args)
  for x in args: p(x,mid)

printTree(2,3,4)